#ifndef _DFA_CONSTRUCT_H_
#define _DFA_CONSTRUCT_H_

#include "dfa.h"

void make_permut(char* p1, char* p2, int alph_size);

inline char get_sval(char * s, int c);
inline void set_sval(char * s, int c, char d);

inline char get_sigma(int v, int c);
inline void set_sigma(int v, int c, char d);

inline void set_last(int v, char c);
inline char get_last(int v);

inline void set_lf(int v, int clf);
inline int get_lf(int v);

inline void set_back(int v, int c);
inline bool is_back(int v, int c);

void construct_dfa(dfa * DFA);
void construct_vertex(dfa * DFA, int v);

struct vertex_queue{
  int * vqueue;
  int vqsize; // Always a perfect power of 2
  int vqbeg;
  int vqend;
  vertex_queue(int _size);
  virtual ~vertex_queue();
  void push_vertex(int v);
  const int pop_vertex();
  const bool is_empty() const;
};

// For Debug Purposes
//void read_word(const char * word);

#endif